
<h3>Invoices</h3>
<h4>Below are invoices sent via intranet</h4>
<table>
	<thead>
		<tr>
			<th>Title</th>
			<th>Comments</th>
			<th>Date</th>
			<th>Download</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
		<?php
	$sql    = "SELECT * FROM invoices WHERE c_id = ".$_SESSION['client_id']."";
	$query  = mysql_query($sql) or die(mysql_error());
	while($row = mysql_fetch_array($query)){
        print '<tr>'; 
			print '<td>'.$row['title'].'</a></td>'; 
			print '<td>'.$row['comments'].'</td>'; 
			print '<td>'.date('m/d/y', strtotime($row['date_added'])).'</td>';
			print '<td class="center"><a href="invoices/'.$row['file'].'" title="Download '.$row['file'].'" target="_blank">Download</a></td>';
        print '</tr>';
    }
?>
	</tbody>
</table>
